
<?php
if(isset($_POST['submit'])):
    
   
?>

<?php 

if (is_numeric($_POST['age'])){
    echo "namsinh:" . (date('Y')- $_POST['age']);}
    else { echo 'nhap khong dung';
}
 
?>

<?php
else:
?>


<form action="nhapTuoiTinhraNamsinh.php" method="post">
    <input type="text" name="age">
    <input type="submit" name="submit" value="namsinh">
    
</form>
<?php
endif;
?>
